<?php
/**
 * Created by PhpStorm.
 * User: kang
 * Date: 2019-09-07
 * Time: 12:16
 */

namespace app\Validate;
use think\Validate;

class Api extends Validate
{
    protected $rule =   [
        'project_id'    => 'require',
        'pid'    => 'require',
        'title'    => 'require|length:2,20',
        'api_url'    => 'require|length:10,200'
    ];

    protected $message  =   [
        'project_id.require' => '项目ID异常',
        'pid.require' => '模块ID异常',
        'title.require' => '请填写接口名称',
        'title.length'     => '接口名称必须在2~20位之间',
        'api_url.require' => '请填写接口地址',
        'api_url.length'     => '接口地址必须在10~200位之间'
    ];
}